#include<iostream>
template<typename T>
T lesser(T a,T b)//2
{
    return a < b ? a : b;
}
int lesser(int a,int b)//2
{
    a = a<0 ? -a : a;
    b = b<0 ? -b : b;
    return a < b ? a : b;
}
int main()
{
    using namespace std;
    int m = 20;
    int n = -30;
    double x = 15.5;
    double y = 16.5;
    cout<<lesser(m,n)<<endl;     //匹配函数2
    cout<<lesser(x,y)<<endl;     //匹配函数1
    cout<<lesser<>(m,n)<<endl;   //匹配函数1，T为int
    cout<<lesser<int>(x,y)<<endl;//匹配函数1，T为int
}
